<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				width: 500px;
				height: 600px;
				border: 1px solid black;
				text-align: center;
				align-content: center;
			}
		</style>
		
		<script>
			window.onload = function()
			{
				let div = document.querySelector('div');
				let btn = document.querySelector('button');
				
				div.onmousemove = function(event)
				{
					div.innerHTML = `${event.clientX} ${event.clientY}`;
				}
				
				div.onmouseout = function()
				{
					div.innerHTML = '';
				}
				
				btn.oncontextmenu = function()
				{
					alert('hello');
					return false;
				}
			}
		</script>
	</head>
	<body>
		<button>按钮</button>
		<div></div>
	</body>
</html>